﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div class="path one columns"><a href="@Url.Action("Index","Home")">首页</a> / Sliders<span><a href="@Url.Action("Index","Slider")">All</a> </div>

<div class="slider"></div>

<div class="works">
  @{
      int n = 0;
      string _myclass="columns two_last";
      }
  @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Slider>)ViewData["sliderList"])
  {
    n++;
    if(n%2!=0)
    {
        _myclass = "columns two";
    }
    <div class="@_myclass">
    <div class="work"><a href="@Url.Content(item.ImgUrl)" rel="prettyPhoto[a]" class="pretty" title="This is the description"> <span></span><img src="@Url.Content(item.ImgUrl)" alt="cards" /></a>
        <h3><a href="@item.LinkTo">@item.Title</a></h3>
        <h4>@item.AddTime.ToString("yyyy-mm-dd")</h4>
    </div>
    </div>
  }
    <div class="clear"></div>
</div>
